package com.example.malldemo.common.exception;

import com.example.malldemo.common.api.IErrorCode;

public class ApiException extends RuntimeException{
    public IErrorCode errorCode;

    public ApiException(IErrorCode errorCode) {
        super(errorCode.getMessage());
    }

    public ApiException(String message) {
        super(message);
    }

    public ApiException(Throwable cause) {
        super(cause);
    }

    public ApiException(String message,Throwable cause) {

        super(message,cause);
    }

    public IErrorCode getErrorCode() {
        return errorCode;
    }
}
